package com.janj.bean;

import java.util.List;

public class Grade {
    private Integer gid ;
    private String gname ;
    //年级和学生的关系?
    //一对多的关系
    private List<Student> students ;

    public Grade() {
    }

    public Grade(Integer gid, String gname, List<Student> students) {
        this.gid = gid;
        this.gname = gname;
        this.students = students;
    }

    public Integer getGid() {
        return gid;
    }

    public void setGid(Integer gid) {
        this.gid = gid;
    }

    public String getGname() {
        return gname;
    }

    public void setGname(String gname) {
        this.gname = gname;
    }

    public List<Student> getStudents() {
        return students;
    }

    public void setStudents(List<Student> students) {
        this.students = students;
    }

    @Override
    public String toString() {
        return "Grade{" +
                "gid=" + gid +
                ", gname='" + gname + '\'' +
                ", students=" + students +
                '}';
    }
}
